
#include "Symbol/TypeSymbol.hpp"
#include "Syntax/Object/TypeKind.hpp"
#include <memory>

SharedTypeSymbol TypeSymbol::Error  = nullptr;
SharedTypeSymbol TypeSymbol::Int    = nullptr;
SharedTypeSymbol TypeSymbol::Bool   = nullptr;
SharedTypeSymbol TypeSymbol::String = nullptr;

SharedTypeSymbol TypeSymbol::Make(TypeKind type)
{
    switch (type)
    {
    case TypeKind::Bool :
    {
        return TypeSymbol::Bool;
    }
    break;
    case TypeKind::Int :
    {
        return TypeSymbol::Int;
    }
    break;
    case TypeKind::String :
    {
        return TypeSymbol::String;
    }
    break;
    default :
        return TypeSymbol::Error;
    }
}
